package com.yiqi.lottery.feature.lottery.view.adapter;

import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yiqi.lottery.R;
import com.yiqi.lottery.entity.bo.ConfirmLotteryBo;
import com.yiqi.lottery.entity.enums.DaletouType;

import java.util.List;

public class DaletouAdapter extends BaseQuickAdapter<ConfirmLotteryBo, BaseViewHolder> {
    public DaletouAdapter() {
        super(R.layout.item_lottery_daletou_add);
    }
    @Override
    protected void convert(BaseViewHolder helper, ConfirmLotteryBo item) {

        helper.setText(R.id.tv_lottery_daletou_add_qian, item.getName())
                .setText(R.id.tv_lottery_daletou_add_hou,item.getHouName())
        .setText(R.id.tv_lottery_daletou_add_type, item.getIsdantuo()?DaletouType.DANTUO.getName():item.getCount()>1?DaletouType.FUSHI.getName():DaletouType.DANSHI.getName())
        .setText(R.id.tv_lottery_daletou_add_count,item.getCount()+"注"+item.getCount()*item.getPrize()+"元");

    }
}
